#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <Monde.h>
#include <QGraphicsView>
#include <QGridLayout>
#include <QHBoxLayout>
#include "MapWidget.h"

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow {
    Q_OBJECT
public:
    MainWindow(QWidget *parent = 0);
    MainWindow(Monde *);
    ~MainWindow();
    void logInfo(const char *);
    void evolve();
    Monde * getMonde();
    void afficherElemAt(int);
    void selectCombo(int);
    void refreshStats();
    void afficherListElements();
    void initCaseMap(Position *);
    void updateItem(int,const char *);
    void afficherMort(int);
    void mapSelection(Position *);

protected:
    void changeEvent(QEvent *e);
    void tracerMap();

private:
    Ui::MainWindow *ui;
    Monde * mondeRef;
    MapWidget * mapW;
    QVBoxLayout * mainLayout;
    QGridLayout * bottomLayout;
    QGridLayout * actionsLayout;
    QGraphicsView * viewMap;
    enum { NbBottomRows = 3, NbBottomCols = 2 };



private slots:
    void slotEvolve();
    void slotEvolveStep();
    void slotQuit();
    void slotSelectElement(int);
};

#endif // MAINWINDOW_H
